#!/usr/bin/env python
'''This module provides a function to make sure the input is correct.'''

def correct(text,method=False,valuelist=[""]):
    '''Main function of this module.'''
    value=input(text)
    while (value in valuelist)!=method:
        value=input("Incorrect input, please try again:")
    return value

if __name__=='__main__':
    print __doc__
